This application relates generally to encoding systems using truth table logic, and in particular to encoding of, for example, detected array states into a digital representation having improved reliability and predictability.
The present invention includes a sensor array encoding system that is specifically designed for implementation on the absolute position detector described in commonly-assigned, co-pending U.S. patent application xe2x80x9cABSOLUTE POSITION DETECTOR INTERPRETING ABNORMAL STATES,xe2x80x9d Ser. No. 09/595,368, filed Jun. 15, 2000 (hereafter xe2x80x9cAPD interpreting Abnormal Statesxe2x80x9d). It will be appreciated, however, that the inventive encoding system disclosed herein is much broader in concept, and is in no way limited to a specific implementation such as is described in APD interpreting Abnormal States. The inventive encoding system has many other applications, including in encoding other suitable sensor array implementations in which abnormal states are accepted rather than rejected.
Encoding systems, such as Binary code or Gray code, for example, are known in the art. FIG. 1A illustrates a conventional linear electrical contact encoder using Gray code. Encoder plate 10 has a conductive encoding pattern 11 equivalent to Gray code etched or clad to an insulating material 12. The conductive pattern is normally connected to the power supply ground 13 while a positive current is applied to each of the contact brushes or pins 14A through 14D. As the encoder plate 10 or the contact pins 14A through 14D are moved, if any one pin 14 contacts a conductive area 11 of the plate 10, a one (low true) output is generated in the output truth table 15. While a pin 14A through 14D is contacting the insulating portion 12 of the plate 10, a zero output is generated in the output table 15. The four contact pins 14A through 14D and the encoding plate 10 as illustrated on FIG. 1A will be understood to generate sixteen distinct codes for each of the sixteen steps as shown in the truth table 15.
Referring now to FIG. 1B, Gray code, as with most other conventional encoder codes, must then be decoded into a code recognizable by computers or other devices such as a displays or printers. Since computers are based on the binary numbering system, a conversion to binary code is usually the most logical. Encoded data (Gray code) from the encoder is input to the decoder 16 and the outputs of the decoder is binary code 17 as shown in the truth tables 18 of FIG. 1C. It will be understood on FIG. 1C that exemplary use is made of four bits of binary code represented by four bits of Gray code to encode the sixteen steps (notated in hexadecimal) in the encoder depicted in FIG. 1A. This exemplary use of four-bit binary code relating to a hexadecimal number of steps will be continued, although it will be understood that the conventional encoding and decoding principles described with reference to FIGS. 1A through 1C may be scaled larger or smaller.
Referring now to FIG. 2A, it is also known in the art that the linear encoding pattern 11 as shown on FIG. 1A may be represented as a circular pattern 21 on endless loop encoder disk 20. The contact pins 24 are shown at the datum zero position 25 with the least significant bit (LSB) at the outer edge and the most significant bit (MSB) at the enter-most ring of the disk. This encoded disk will produce the same Gray code as shown in the truth table 15 of FIG. 1A and may be decoded to binary using a decoder 16 as depicted in FIG. 1B to yield the truth tables 18 of FIG. 1C.
Although useful to illustrate a principle, electrical contact encoders are seldom used in today""s industrial applications due to numerous performance-related problems. These types of encoders have a finite life due to mechanical wear between the contact plates and brushes or pins. Reliability of a contact device is affected by possible contamination and corrosion which could isolate a contact area. Design and construction require extremely tight tolerances to prevent ambiguous states as discussed below. Some materials used in construction of a contact encoder can generate piezoelectric noise under shock or vibration.
Further, encoders such as illustrated on FIGS. 1A and 2A can generate invalid codes resulting from ambiguous states when an unwanted contact is made or is not made relative to another contact. For example, the end of a conductive plate, whether rotary or linear, is often a site of premature mechanical wear. This wear generates imprecise contact. Moreover, rotary encoder devices such as illustrated in FIG. 2A are particularly prone to this problem with ambiguous states. FIG. 2B shows an area 26 likely to be affected by ambiguous states resulting from an ambiguous contact position. The problem is amplified in multi-turn shaft encoders deployed as geared disks in a hierarchical relationship, where the gears produce a cumulative error from the least significant digit to the most significant.
By examining an example of a conventional multi-turn encoder 27 depicted in FIG. 2C, the problem will become more apparent. The multi-turn encoder 27 has four encoder disks A through D, each comprising large gears 28A through 28D, and further comprising encoding patterns 21 analogous to those depicted on FIGS. 2A and 2B (encoding patterns not illustrated on FIG. 2C). Large gears 28A through 28D mesh with small gears 29A through 29D. The ratio between large gears 28A through 28D and small gears 29A through 29D is a function of desired multiplication (M). Since computers use binary code, it is generally preferable to user a binary number as the multiplier. Using an exemplary value of 16 (or 24) for M, each large gear 28A through 28D needs to have 16xc3x97N teeth, where N is the number of teeth on each small gear 29A through 29D. Using an exemplary value of 8 (or 23) for N, then each large gear 28A through 28D has 16xc3x978=128 teeth. Now, with a gear ratio of 16:1 it will be understood that second encoder disk B turns one revolution for each sixteen revolutions of the first encoder disk A, and so on. Thus fourth encoder disk D turns one revolution for each 4096 revolutions of the first encoder disk A. Giving each encoder disk A through D on FIG. 2C an encoding pattern identical to the encoding pattern 21 depicted on FIGS. 2A and 2B, each encoder disk A through D monitors for 16 steps 0 through F (as notated in hexadecimal). The total number of steps capable of being monitored by multi-turn encoder 27 on FIG. 2C is thus 4096xc3x9716=65,536 (or 216).
Rotary encoders incur ambiguous state errors primarily because, with reference to FIGS. 2A and 2B, the different contact pins 24 travel a significantly different distance around in one revolution of the disk. The difference in distance of travel is the difference in circumference of two paths around the disk. Further, the greatest difference is between least significant bit (LSB) and most significant bit (MSB). For example, if the radius of the MSB track in FIGS. 2A and 2B is 0.2xe2x80x3 from the center of the shaft, and the radius of the LSB track is 1xe2x80x3 from the center of the shaft, the difference in circumferential travel is a factor of over 5, meaning that the MSB is moving over five times slower than the LSB. Referring again to FIG. 2D, any movement of the encoder disk A will produce {fraction (1/4095)} of that movement in encoder disk D. If the cumulative error of the three sets of gears between the disk is greater than {fraction (1/4095)} (about 0.088 degrees) of one revolution of the input shaft then a whole bit error occurs at the most significant digit. This equates to a maximum tolerance of less than 0.029 degrees per gear. Such tight manufacturing tolerances are hard to maintain, and variances from tolerance tend to create ambiguous state errors.
As noted above, ambiguous state errors are also caused by ambiguous contacts (such as illustrated as item 29 on FIG. 2B). Turning to FIG. 2C, ambiguous contacts on encoder disk D will cause their own problems on disk D, and will further cause magnified errors on disks C, B and A because the output of encoder disk D has a weighted output of up to 4096 times that of the other disks C, B and A. An ambiguous state on any one disk A, B, C or D can cause a serious error in measurement. The magnification factor over more than one disk again compounds the problem.
It will be understood that Gray code is the most widely used encoding system in encoders of the current art. Other encoding schemes such as binary V-scan are also used in an attempt to compensate for errors such as ambiguous states, or hardware component failure. Binary V-scan (not illustrated) uses two contacts per bit except for the LSB (the LSB allows a valid zero state). These two contact areas for each bit are constructed in a leading and lagging pattern which form a V shape encoding pattern. Error detection is enabled by using one contact to verify the other contact in a progressing set.
Gray code is generally favored over binary V-scan because only one bit may change for each positional step (as illustrated in truth table 15 on FIG. 1A). This makes error detection much easier because if two or more bits change state from one step to the next, then an error is detected.
The foregoing has described the problem in the art of ambiguous states due to imprecise manufacturing or premature contact wear. In addition to this problem, there is the problem of ambiguous states caused by invalid zero state recognition. It will be understood that Gray and binary V-scan encoding, like all codes allowing a valid zero state, are subject to such errors. Referring to the conventional linear electrical contact encoder illustrated in FIG. 1A, it will be seen that if the LSB contact pin 14A fails to make contact with the first contact area at Step 1, then this step is decoded as zero, a full one step error. If the LSB contact pin 14A and the next significant bit contact pin 14B each fail to contact the first two contact areas, the first detectable state is at Step 4, which is actually an error in itself because it will be decoded as Step 7. The first three steps would be decoded as zero, which is a valid but erroneous position. The first valid correct detectable step may indeed not occur until Step 7. The next step (Step 8) is a valid decodable step because only one bit changed. The encoder output will remain at Step 8 until Step C (step 12) which will be decoded as an invalid step because more than one bit changed. The total error prior to detecting the error is then eleven steps. If this error occurred at a fourth digit with a weighted magnitude of 4096/step (as is possible on the multi-turn encoder 27 illustrated on FIG. 2C), the total number of decoding errors would be 4096xc3x9711=45,056.
By analogy to the foregoing example, the magnitude of zero state errors can now be appreciated. Should even a one bit error occur on the 2nd, 3rd or 4th disk B through D of the multi-turn encoder 27 of FIG. 2C, because the error will be multiplied by 16, 256 or 4096 respectively. It will be understood that any encoding method allowing zero as a valid state is subject to these errors.
The exemplary use of contact-type encoders in FIGS. 1A, 1B, 1C, 2A, 2B and 2C is not meant to suggest that the above-described problems in the art of ambiguity and reliance on allowing zero as a valid state are unique to such contact-type encoders. In fact, optical, magnetic and other non-contact encoders have an even greater problem with ambiguity and require even tighter tolerances to control. It is often assumed that optical encoders using Gray code are more reliable than contact encoders because errors caused by contact wear and associated component failure are obviated. This can be false security because the encoding is still vulnerable to a zero state error. Light sources (often times LEDs) and light sensors (often times photo transistors) are subject to failure. More importantly, these encoders use integrated circuits for interface with the sensors. The interface circuits are subject to failure where a single integrated circuit chip may cause multiple sensor inputs to remain at the zero state. Thus, in view of the foregoing discussion, it will be appreciated that a single component failure in optical, magnetic and other non-contact encoders can produce undetectable errors of substantial magnitude.
Moreover, optical encoders have their own problems with ambiguity. As noted above, optical encoders are often favored in the current art over contact encoders because optical encoders do not suffer from as many wear-related problems. A typical optical encoder of the current art uses one or more light sources sensed by photoelectric sensors. These encoders nonetheless still continue to use Gray code encoded on plates and disks. FIGS. 3A and 3B depict encoded patterns 31A and 31B respectively, where plates 30A and 30B are opaque and the encoded patterns 31A and 31B are windows or slots selectively allowing light to pass through plates 30A and 30B. Such selective sensor activation is illustrated in FIG. 3C, in which an array of light sources 35 typically selectively energizes light sensors 36 according to the Gray code encoded on the plates 30A and 30B. By analogy to FIGS. 1A and 2A, it will be seen that the encoded patterns of windows or slots 31A and 31B on FIGS. 3A and 3B correspond to the encoded patterns of contact areas 11 and 21 on FIGS. 1A and 2A respectively.
As noted above, however, conventional optical encoders are recognized to be actually more vulnerable to ambiguity problems than contact-type encoders, the absence of contact-related problems notwithstanding For example, it is more difficult to control an optical (or other non-contact) communication path between source and sensor than on a contact-type encoder. Lenses of the light sources and sensors are also subject to moisture and other contamination. Such contamination may cause light to deflect, diffuse and diffract. This may not cause a problem when the encoder window can be manufactured to be in exact alignment with the desired sensory path, but may, as shown on FIG. 3D, cause ambiguous bit errors when the window is just a small amount out of alignment. This condition can often occur on the inner track of a rotary disk such as is illustrated on FIG. 3B, in view the smaller circumference and attendant smaller window size tolerances.
Further, when installed on cumulative gears, conventional optical encoders are also prone to the same error magnification problems described above with reference to FIG. 2C. In fact, optical (or other non-contact) encoders often require even tighter tolerances or the use of stepper type gearing, which severely limits effective operational input shaft speed.
From the previous discussion, it should now be appreciated that rotary optical encoders of the current art require much tighter manufacturing tolerances than their counterpart contact encoders. The problem is exacerbated when physical space limitations require the encoder assembly to be small. Size can be reduced in current art optical encoders by using, as shown on FIG. 3E, a disk or plate 37 providing a reflective encoded pattern. The light sources 35 and sensors 36 may then be deployed on the same side of the disk in order to reduce the size of the assembly. Now even tighter tolerances are required to prevent ambiguous states. As illustrated on FIG. 3F, some current art encoders use a disk or plate 38 providing a combination of encoded windows and reflective surfaces 39 to deflect the angle of the beam of light passing from the sources 35 to the sensors 36. These types of assemblies require yet even tighter tolerances due to the critical alignment of all components.
There is therefore a need in the art for an innovative encoding system which does not require such tight manufacturing tolerances to be reliable and accurate. Maintaining reliability and encoding accuracy while relaxing these tolerances will promote simplicity, robustness and lower cost. Further, if requirements for these tight tolerances are reduced, then source to sensor communications media other than light may be used. Source to sensor communications media having less precise radiation patterns, such as magnetic flux, radio waves, microwaves or ultrasound become serviceable. These alternative communications media may bring specific additional advantages to particular encoder applications or environments.
There is also a need in the art for an innovative encoding method which is not so sensitive to the adverse effects of error magnification in step-up gears. Such a new encoding system would be particularly advantageous by providing reliable and accurate scaling without limiting input shaft speed.
There is a further need in the art for an encoding system that tends to eliminate zero state errors. These types of errors are inherent in the physical susceptibility of hardware to breakdowns. Sources and sensors, and perhaps more importantly interface circuits, have a finite operational lifetime. An encoding system that at least recognizes an erroneous state (rather than erroneously misinterpreting it as an inaccurate valid state) will bring advantage to the encoding art.
These and other needs in the art are addressed by an inventive encoding system that expects, accepts and interprets both normal and abnormal states of a sensor array, and that further recognizes a zero state as a malfunction. The system is xe2x80x9cabsolute,xe2x80x9d in that it allows detection of the best fit detectable position of a movable object with an accuracy equal to the resolution which is equal to one-half the physical displacement of sensors or sources in an array. Such absolute references may be used to define a position detector which properly detects the position of an object after power is applied, even though the object may have moved further after power is removed. As a result, the inventive encoder does not require a battery back-up to detect position accurately after a power failure. This functionality is highly advantageous when detecting shaft position of a multi-turn shaft. The inventive encoding system is also scalable so that there are few limitations in deployment. Truth table logic is employed in a logic function that is designed to implement the foregoing attributes of the inventive encoding system.
It will be noted that embodiments of the invention as set forth below refer from time to time to sensors (or other types of elements capable of being detected in one of two different states) as being in either a xe2x80x9chighxe2x80x9d or xe2x80x9clowxe2x80x9d condition. It will be understood that, consistent with the principles of digital logic, that xe2x80x9chighxe2x80x9d refers to an activated state, and that xe2x80x9clowxe2x80x9d refers to a deactivated state.
According to one aspect, the inventive encoding system may be embodied in a method for encoding a current state of an array of elements, each element currently in either a high or low condition, the method comprising identifying a set of expected valid normal detected states of the array, the set of expected valid normal detected states excluding a state in which all elements are detected to be in low condition; identifying a set of expected valid abnormal detected states for the array, the set of expected valid abnormal detected states also excluding a state in which all elements are detected to be in low condition; identifying a set of events to which normal and abnormal detected states of the array are to correspond; developing a truth table in which each event in the set thereof corresponds to at least one expected valid normal detected state of the array and at least one expected valid abnormal detected state of the array; polling the current state of the array; and identifying a current event from the set of events based upon the truth table in view of current state of the array as polled.
According to another aspect, the inventive encoding system may be embodied in a method for encoding a positional state of a hierarchical gear assembly, the gear assembly comprising a plurality of interrelated rotary gears, one complete revolution of a lower gear causing a predetermined amount of rotation less than one revolution in an immediately higher gear, the method comprising deploying at least one source on each rotary gear; deploying a sensor array for each rotary gear, each array comprising at least three sensors in sensory communication with the sources on its corresponding rotary gear; identifying a set of expected valid normal detected states for each array; identifying a set of expected valid abnormal detected states for each array; identifying a set of positional states of the hierarchical gear assembly to which combinations of normal and abnormal detected states in each array are to correspond; developing a truth table in which each positional state of the hierarchical gear assembly in the set thereof corresponds to a combination of at least one expected valid normal detected state of each array and at least one expected valid abnormal detected state of each array; polling the current state of each array; and identifying a current positional state for the hierarchical gear assembly from the truth table based upon the combined current states of the arrays as polled.
It will therefore be seen that a technical advantage of the SCALF code invention is that it facilitates sensor array encoding in an environment in which both normal and abnormal states may be interpreted (such as is disclosed and described in co-pending application APD interpreting Abnormal States, referred to above). The inventive SCALF code will be seen to be a novel approach to such encoding that brings about certain further zero-state error detection advantages described below. It will be understood, however, that SCALF code has encoding applications in many embodiments beyond APD interpreting Abnormal States. In fact, SCALF code may be used to encode the condition of any array in which both normal and abnormal states are expected.
A further technical advantage of the SCALF code invention is its ability to minimize errors misinterpreting zero states in the array. By requiring that at least one sensor be activated at all times, encoding of the array according to SCALF code allows hardware to perform Boolean logic simplification in which a zero state output code has meaning as valid normal or abnormal state. SCALF code thus may interpret a zero state in the array as a fault condition.
The foregoing has outlined rather broadly the features and technical advantages of the present invention in order that the detailed description of the invention that follows may be better understood. Additional features and advantages of the invention will be described hereinafter which form the subject of the claims of the invention. It should be appreciated by those skilled in the art that the conception and the specific embodiment disclosed may be readily utilized as a basis for modifying or designing other structures for carrying out the same purposes of the present invention. It should also be realized by those skilled in the art that such equivalent constructions do not depart from the spirit and scope of the invention as set forth in the appended claims.